import { z } from 'zod';

// Example validation schema for creating a task session
export const createTaskSessionSchema = z.object({
  userId: z.string(),
  title: z.string().max(200),
  description: z.string().max(1000).optional(),
  priority: z.enum(['low', 'medium', 'high', 'urgent']).default('medium'),
  tags: z.array(z.string()).optional(),
  metadata: z.object({
    createdBy: z.string(),
    lastModifiedBy: z.string(),
    complexity: z.enum(['simple', 'medium', 'complex']).default('medium'),
  }),
});

// Example validation schema for creating a subtask
export const createSubTaskSchema = z.object({
  title: z.string().max(200),
  description: z.string().max(500).optional(),
  priority: z.enum(['low', 'medium', 'high', 'urgent']).default('medium'),
  assignedTo: z.string().optional(),
  estimatedDuration: z.number().min(0).optional(),
  dependencies: z.array(z.string()).optional(),
  dueDate: z.date().optional(),
});

// Type inference from schemas
export type CreateTaskSessionInput = z.infer<typeof createTaskSessionSchema>;
export type CreateSubTaskInput = z.infer<typeof createSubTaskSchema>;
